package com.wyz.socket.core.base.packet.stream;

import com.wyz.socket.core.base.packet.AbstractReceivePacket;
import com.wyz.socket.core.base.packet.AbstractSendPacket;

import java.io.InputStream;
import java.io.OutputStream;

public class StreamDirectReceivePacket extends AbstractReceivePacket<OutputStream, OutputStream> {
    private OutputStream outputStream;

    public StreamDirectReceivePacket(OutputStream outputStream, int length) {
        super(length);
        this.outputStream = outputStream;
    }

    @Override
    public byte type() {
        return TYPE_STREAM_DIRECT;
    }

    @Override
    protected OutputStream createStream() {
        return outputStream;
    }

    @Override
    protected OutputStream build(OutputStream stream) {
        return outputStream;
    }
}
